home *** CD-ROM | disk | FTP | other *** search
-
-
-
- CCCCwwwwdddd((((3333)))) CCCCwwwwdddd((((3333))))
-
-
-
- NNNNAAAAMMMMEEEE
- getcwd - get pathname of current working directory
-
- SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
- use Cwd;
- $dir = cwd;
-
- use Cwd;
- $dir = getcwd;
-
- use Cwd;
- $dir = fastgetcwd;
-
- use Cwd 'chdir';
- chdir "/tmp";
- print $ENV{'PWD'};
-
-
- DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
- The _g_e_t_c_w_d() function re-implements the _g_e_t_c_w_d(3) (or _g_e_t_w_d(3)) functions
- in Perl.
-
- The _f_a_s_t_c_w_d() function looks the same as _g_e_t_c_w_d(), but runs faster. It's
- also more dangerous because it might conceivably _c_h_d_i_r() you out of a
- directory that it can't _c_h_d_i_r() you back into. If fastcwd encounters a
- problem it will return undef but will probably leave you in a different
- directory. For a measure of extra security, if everything appears to
- have worked, the _f_a_s_t_c_w_d() function will check that it leaves you in the
- same directory that it started in. If it has changed it will die with the
- message "Unstable directory path, current directory changed
- unexpectedly". That should never happen.
-
- The _c_w_d() function looks the same as getcwd and fastgetcwd but is
- implemented using the most natural and safe form for the current
- architecture. For most systems it is identical to `pwd` (but without the
- trailing line terminator).
-
- It is recommended that cwd (or another *_c_w_d() function) is used in _a_l_l
- code to ensure portability.
-
- If you ask to override your _c_h_d_i_r() built-in function, then your PWD
- environment variable will be kept up to date. (See the section on
- _O_v_e_r_r_i_d_i_n_g _B_u_i_l_t_i_n _F_u_n_c_t_i_o_n_s in the _p_e_r_l_s_u_b manpage.) Note that it will
- only be kept up to date if all packages which use chdir import it from
- Cwd.
-
-
-
-
-
-
-
-
-
-
- PPPPaaaaggggeeee 1111
-
-
-
-